package jgl.vajra.management.part.home.fragment;

import androidx.fragment.app.Fragment;

import java.util.ArrayList;
import java.util.List;

import jgl.vajra.management.R;
import jgl.vajra.management.databinding.FragmentOrderPageBinding;
import jgl.vajra.management.manager.FragmentManager;
import jgl.vajra.management.part.home.viewModel.OrderPageViewModel;
import jgl.vajra.management.widget.mvvm.factory.CreateViewModel;
import jgl.vajra.management.widget.mvvm.view.BaseMVVMFragment;

@CreateViewModel(OrderPageViewModel.class)
public class OrderPageFragment extends BaseMVVMFragment<OrderPageViewModel, FragmentOrderPageBinding> {
    @Override
    public int getLayoutId() {
        return R.layout.fragment_order_page;
    }

    @Override
    public void initView() {

        List<String> titleList = new ArrayList<>();
        titleList.add("进行中");
        titleList.add("已完成");
        titleList.add("已取消");
        List<Fragment> fragmentList = new ArrayList<>();
        OrderPageListFragment listFragment1 = FragmentManager.getOrderPageListFragment(1);
        fragmentList.add(listFragment1);
        OrderPageListFragment listFragment2 = FragmentManager.getOrderPageListFragment(3);
        fragmentList.add(listFragment2);
        OrderPageListFragment listFragment3 = FragmentManager.getOrderPageListFragment(2);
        fragmentList.add(listFragment3);
        mBinding.tabLayout.setCustomViewTabLayoutView(getChildFragmentManager(), titleList, fragmentList);

    }

    @Override
    public void initData() {

    }

    @Override
    public void initEvent() {

    }
}
